import zerorpc

class StreamRPC(object):
    @zerorpc.stream
    def streaming_range(self, start, end, step):
        return range(start, end, step)

s = zerorpc.Server(StreamRPC())
s.bind("tcp://0.0.0.0:4242")
s.run()